package com.leetcode.opration;

/**
 * Created by huangyugen on 2019/07/31
 **/
public class YihuoTest {

    public static void main(String[] args) {
        //相同的数异或得到0，与0异或得到本身
        int a = 1000000;
        int b = 29999999;
        System.out.println("a ^ a = " +  (a ^ a));
        System.out.println("b ^ 0 = " +  (b ^ 0));
        a = a ^ b;

        b = b ^ a;
        a = a ^ b;

        System.out.println(" a = " + a);
        System.out.println(" b = " + b);


    }
}
